{% extends "cms/base.html"%}
{% block content %}


<div class="container">
    <div class="tabs">
        <ul>
            <li class="{%if not query.category_id and not query.category_id%}is-active{%else%}{%endif%}"><a
                    href="?category_id=">全部</a></li>
            {% for category in categories %}
            <li class="{%if query.category_id and query.category_id == ''~category.id %}is-active{%else%}{%endif%}"><a
                    href="?category_id={{category.id}}">{{category.name}}</a></li>
            {%endfor%}

        </ul>
    </div>

    {% for article in articles.0 %}
    {{cms::article_item(article=article)}}
    {% endfor %}
    {{ cms::pagination(page=page.page, pages=articles.2) }}
</div>
{% endblock %}